package Logica2;


import Logica.Operaciones;
import java.util.ArrayList;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Santiago
 */
public class Principal 
{
    private int datoX = 0;
    private int datoY = 0;
    private ArrayList a = new ArrayList();
    private int suma;
    private float promedio;
    private int mayor;
    private Operaciones o;


    
    public Principal()
    {
        o= new Operaciones();
        o.setAl(a);

    }
    public void llenarA()
    {
        a.add(getDatoX());
        a.add(getDatoY());
        o.setAl(a);
        mayor=o.valormax();
        promedio=o.promedio();
        suma=o.suma();
    }


     /**
     * @return the datoX
     */
    public int getDatoX() {
        return datoX;
    }

    /**
     * @param datoX the datoX to set
     */
    public void setDatoX(int datoX) {
        this.datoX = datoX;
    }

    /**
     * @return the datoY
     */
    public int getDatoY() {
        return datoY;
    }

    /**
     * @param datoY the datoY to set
     */
    public void setDatoY(int datoY) {
        this.datoY = datoY;
        llenarA();
    }
    public ArrayList getArreglo() {
        return a;
    }

    public int getMayor() {
        return mayor;
    }

    public float getPromedio() {
        return promedio;
    }

    public int getSuma() {
        return suma;
    }
    

    


}
